<!DOCTYPE html>
<html lang="en">
<head>
    <th:block th:include="libs :: header('组织机构管理')"></th:block>
</head>
<body>
  <div id="OrganizePage">
    <ivz-drawer-view ref="vbt" :metas="metas" :config="config" :search-metas="searchMetas"></ivz-drawer-view>
  </div>
</body>
<th:block th:include="libs :: footer"></th:block>
<script>
    let status = [
        {value: '正常', label: '正常'},
        {value: '禁用', label: '禁用'},
    ];
    let OrgType = [
        {value: 'Org', label: '机构'},
        {value: 'Dept', label: '部门'},
        {value: 'Company', label: '公司'},
    ]
  let vue = new Vue({
      el: "#OrganizePage",
      data: {
          metas: [
              {field: 'name', title: '名称', required: true, width: 240, align: 'left'},
              {field: 'pid', title: '父级', type: 'stree', isTable: false, url: '/core/org/view'},
              {field: 'type', title: '类型', type: 'select', data: OrgType, clear: true, required: true},
              {field: 'leader', title: '负责人'},
              {field: 'email', title: '邮箱', width: 180, type: 'email'},
              {field: 'status', title: '状态', width: 160, clear: true
                  , type: 'select', data: status, default: '正常'},
              {field: 'createTime', title: '创建时间', type: 'date', width: 220, isForm: false},
              {field: 'action', title: '操作', type: 'action'}
          ],
          searchMetas: [
              {field: 'name', title: '名称'},
              {field: 'type', title: '类型', type: 'select', data: OrgType, clear: true},
          ],
          config: {
              table: {
                  defaultExpandAllRows: true
              }
          },
      },
  });
</script>
</html>
